| GDK_STRUCTURE_MASK);
attributes.type_hint = GDK_WINDOW_TYPE_HINT_TOOLBAR;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_TYPE_HINT;
- priv->float_window = gdk_window_new (gtk_widget_get_root_window (widget),
+ priv->float_window = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
&attributes, attributes_mask);
gdk_window_set_user_data (priv->float_window, widget);
gdk_window_set_decorations (priv->float_window, 0);
*/
send_event = gdk_event_new (GDK_BUTTON_RELEASE);
- send_event->button.window = g_object_ref (gtk_widget_get_root_window (source_widget));
+ send_event->button.window = g_object_ref (gdk_screen_get_root_window (gtk_widget_get_screen (source_widget)));
send_event->button.send_event = TRUE;
send_event->button.time = time;
send_event->button.x = 0;
* to query it here. We could use XGetModifierMapping, but
* that would be overkill.
*/
- root_window = gtk_widget_get_root_window (widget);
+ root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
gdk_window_get_device_position (root_window, pointer, NULL, NULL, &state);
event->state = state;
parent = gtk_widget_get_parent_window (widget);
if (parent == NULL)
- parent = gtk_widget_get_root_window (widget);
+ parent = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
attributes.x = -100;
attributes.y = -100;
{
GdkWindowAttr attributes;
gint attributes_mask;
+ GdkWindow *parent;
attributes.x = -100;
attributes.y = -100;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR;
- window = gdk_window_new (gtk_widget_get_root_window (GTK_WIDGET (menu)),
+ parent = gdk_screen_get_root_window (gtk_widget_get_screen (GTK_WIDGET (menu)));
+ window = gdk_window_new (parent,
&attributes, attributes_mask);
gtk_widget_register_window (GTK_WIDGET (menu), window);
GtkPlugPrivate *priv;
GtkWidget *widget;
GdkWindow *window;
+ GdkWindow *root_window;
gboolean result;
gboolean widget_was_visible;
widget_was_visible = gtk_widget_get_visible (widget);
window = gtk_widget_get_window (widget);
+ root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
gdk_window_hide (window);
_gtk_widget_set_in_reparent (widget, TRUE);
- gdk_window_reparent (window,
- gtk_widget_get_root_window (widget),
- 0, 0);
+ gdk_window_reparent (window, root_window, 0, 0);
gtk_widget_unparent (GTK_WIDGET (plug));
_gtk_widget_set_in_reparent (widget, FALSE);
if (gtk_widget_is_toplevel (widget))
{
+ GdkWindow *root_window;
attributes.window_type = GDK_WINDOW_TOPLEVEL;
+ root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
+
gdk_error_trap_push ();
if (priv->socket_window)
gdk_window = gdk_window_new (priv->socket_window,
&attributes, attributes_mask);
else /* If it's a passive plug, we use the root window */
- gdk_window = gdk_window_new (gtk_widget_get_root_window (widget),
+ gdk_window = gdk_window_new (root_window,
&attributes, attributes_mask);
/* Because the window isn't known to the window manager,
* frame sync won't work. In theory, XEMBED could be extended
gdk_error_trap_push ();
gdk_window_destroy (gdk_window);
gdk_error_trap_pop_ignored ();
- gdk_window = gdk_window_new (gtk_widget_get_root_window (widget),
- &attributes, attributes_mask);
+ gdk_window = gdk_window_new (root_window,
+ &attributes, attributes_mask);
gtk_widget_set_window (widget, gdk_window);
}
attributes.y = y;
attributes.width = width;
attributes.height = height;
- tree_view->priv->drag_highlight_window = gdk_window_new (gtk_widget_get_root_window (widget),
+ tree_view->priv->drag_highlight_window = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
&attributes, attributes_mask);
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
attributes.y = y;
attributes.width = width;
attributes.height = height;
- tree_view->priv->drag_highlight_window = gdk_window_new (gtk_widget_get_root_window (widget), &attributes, attributes_mask);
+ tree_view->priv->drag_highlight_window = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (widget)), &attributes, attributes_mask);
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
mask_image = cairo_image_surface_create (CAIRO_FORMAT_A1, width, height);
attributes.visual = gtk_widget_get_visual (widget);
attributes_mask = 0;
- parent_window = gtk_widget_get_root_window (widget);
+ parent_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
gtk_widget_get_allocation (widget, &allocation);
attributes.width = allocation.width;